home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / EMIL.ARJ / HI.H next >
Text File  |  1991-04-28  |  2KB  |  52 lines

  1. /* hi.h: Header file for HIMEM.SYS support code
  2.  *
  3.  * This file may be distributed freely as long as it is not
  4.  * separated from the rest of the Extended Memory Interface Library.
  5.  *
  6.  */
  7.  
  8. /* Return nonzero if HIMEM is installed */
  9. int far cdecl pinghi(void);
  10.  
  11. /* Initialize stuff.  Call once before anything else. */
  12. void far cdecl hiinit(void);
  13.  
  14. /* Allocate extended memory.  Returns handle to memory
  15.  * allocated, or 0 if HIMEM could not allocate it.
  16.  */
  17. unsigned int far cdecl himalloc(unsigned long size);
  18.  
  19. /* Free extended memory. */
  20. void far cdecl hifree(unsigned int handle);
  21.  
  22. /* hicontig returns the size of the largest contiguous block of
  23.  * extended memory.  himemavl returns the total extended memory
  24.  * available.
  25.  */
  26. unsigned long far cdecl hicontig(void);
  27. unsigned long far cdecl himemavl(void);
  28.  
  29. /* hilock locks (write-protects) the given handle.
  30.  * hiunlock unprotects a previously locked handle.
  31.  */
  32. int far cdecl hilock(unsigned handle);
  33. int far cdecl hiunlock(unsigned handle);
  34.  
  35. /* hi2real copies from extended memory to DOS memory;
  36.  * real2hi copies from DOS memory to extended memory.
  37.  * DOS memory is specified as a normal far pointer.
  38.  * Extended memory is specified as a handle and a 32-bit
  39.  * offset from that handle.
  40.  *
  41.  * Both functions return 1 if successful and 0 if not.
  42.  */
  43. int far cdecl hi2real(void far *dest,
  44.               unsigned src,
  45.               unsigned long offset,
  46.               unsigned count);
  47.  
  48. int far cdecl real2hi(unsigned dest,
  49.               unsigned long offset,
  50.               void far *src,
  51.               unsigned count);
  52.